<?php
include_once('../libs/bn_path.php');
bn_include_lib('bn_config');
ob_start();    
$login=new bn_login();
$conf=new bn_config;
$lan=new bn_lang;
$lan->load_lang('admin',$conf->Get_value('default_language'));
if($login->login_user())
bn_redirect('main.php');
?>
<!DOCTYPE html>
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title></title>
      <link rel="stylesheet" type="text/css" href="<?php bn_css_path('extra'); ?>">
      
      <link rel="stylesheet" type="text/css" href="<?php bn_css_path('main'); ?>">
      
      <script src="<?php bn_jquery_path('jquery-latest');?>"></script>
      <script src="<?php bn_jquery_path('functions');?>"></script>
   </head>
   <body>
      <div id="wrapper">
         <section id="login">
         <p><?php echo $lang[0] ?></p>
            <form method="POST" action="http://localhost/BaharNarenj/admin/login.php">
               <input type="text" name="user" class="input-text" style="width:300px;display:block;margin:5px" placeholder="<?php echo $lang[1] ?>" required/>
               <input type="password" name="pass" class="input-text" style="width:300px;display:block;margin:0 5px 0 5px" placeholder="<?php echo $lang[2] ?>" required/><br>
               <?php
               if($conf->get_value('captcha')!='')
               {
                $cap=bn_captcha::getInstance();
                $cap->add_captchaphp();
                echo '<img src="./captcha/captcha.php"/><input type="text" name="captcha" id="captcha" size="20" class="input-text" required/><br />';
               }
               ?>
               <input type="submit" name="login" id="my_login" class="button blue" style="margin:0 5px 5px 0" value="<?php echo $lang[3] ?>"/>
               <a href="../user/forgetpassword.php"><?php echo $lang[4] ?></a>
            </form>
         </section>
      </div><!--#/wrapper-->
   </body>
</html>